{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport Portal from '@rc-component/portal';\nimport DrawerPopup from './DrawerPopup';\nimport { warnCheck } from './util';\nvar Drawer = function Drawer(props) {\n  var _props$open = props.open,\n    open = _props$open === void 0 ? false : _props$open,\n    _props$prefixCls = props.prefixCls,\n    prefixCls = _props$prefixCls === void 0 ? 'rc-drawer' : _props$prefixCls,\n    _props$placement = props.placement,\n    placement = _props$placement === void 0 ? 'right' : _props$placement,\n    _props$autoFocus = props.autoFocus,\n    autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,\n    _props$keyboard = props.keyboard,\n    keyboard = _props$keyboard === void 0 ? true : _props$keyboard,\n    _props$width = props.width,\n    width = _props$width === void 0 ? 378 : _props$width,\n    _props$mask = props.mask,\n    mask = _props$mask === void 0 ? true : _props$mask,\n    _props$maskClosable = props.maskClosable,\n    maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,\n    getContainer = props.getContainer,\n    forceRender = props.forceRender,\n    afterOpenChange = props.afterOpenChange,\n    destroyOnClose = props.destroyOnClose;\n  var _React$useState = React.useState(false),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    animatedVisible = _React$useState2[0],\n    setAnimatedVisible = _React$useState2[1];\n  // ============================= Warn =============================\n  if (process.env.NODE_ENV !== 'production') {\n    warnCheck(props);\n  }\n  // ============================= Open =============================\n  var internalAfterOpenChange = function internalAfterOpenChange(nextVisible) {\n    setAnimatedVisible(nextVisible);\n    afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(nextVisible);\n  };\n  // ============================ Render ============================\n  if (!forceRender && !animatedVisible && !open && destroyOnClose) {\n    return null;\n  }\n  var drawerPopupProps = _objectSpread(_objectSpread({}, props), {}, {\n    open: open,\n    prefixCls: prefixCls,\n    placement: placement,\n    autoFocus: autoFocus,\n    keyboard: keyboard,\n    width: width,\n    mask: mask,\n    maskClosable: maskClosable,\n    inline: getContainer === false,\n    afterOpenChange: internalAfterOpenChange\n  });\n  return /*#__PURE__*/React.createElement(Portal, {\n    open: open || forceRender || animatedVisible,\n    autoDestroy: false,\n    getContainer: getContainer,\n    autoLock: mask && (open || animatedVisible)\n  }, /*#__PURE__*/React.createElement(DrawerPopup, drawerPopupProps));\n};\nif (process.env.NODE_ENV !== 'production') {\n  Drawer.displayName = 'Drawer';\n}\nexport default Drawer;","map":{"version":3,"names":["_objectSpread","_slicedToArray","React","Portal","DrawerPopup","warnCheck","Drawer","props","_props$open","open","_props$prefixCls","prefixCls","_props$placement","placement","_props$autoFocus","autoFocus","_props$keyboard","keyboard","_props$width","width","_props$mask","mask","_props$maskClosable","maskClosable","getContainer","forceRender","afterOpenChange","destroyOnClose","_React$useState","useState","_React$useState2","animatedVisible","setAnimatedVisible","process","env","NODE_ENV","internalAfterOpenChange","nextVisible","drawerPopupProps","inline","createElement","autoDestroy","autoLock","displayName"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-drawer/es/Drawer.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport Portal from '@rc-component/portal';\nimport DrawerPopup from './DrawerPopup';\nimport { warnCheck } from './util';\nvar Drawer = function Drawer(props) {\n  var _props$open = props.open,\n    open = _props$open === void 0 ? false : _props$open,\n    _props$prefixCls = props.prefixCls,\n    prefixCls = _props$prefixCls === void 0 ? 'rc-drawer' : _props$prefixCls,\n    _props$placement = props.placement,\n    placement = _props$placement === void 0 ? 'right' : _props$placement,\n    _props$autoFocus = props.autoFocus,\n    autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,\n    _props$keyboard = props.keyboard,\n    keyboard = _props$keyboard === void 0 ? true : _props$keyboard,\n    _props$width = props.width,\n    width = _props$width === void 0 ? 378 : _props$width,\n    _props$mask = props.mask,\n    mask = _props$mask === void 0 ? true : _props$mask,\n    _props$maskClosable = props.maskClosable,\n    maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,\n    getContainer = props.getContainer,\n    forceRender = props.forceRender,\n    afterOpenChange = props.afterOpenChange,\n    destroyOnClose = props.destroyOnClose;\n  var _React$useState = React.useState(false),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    animatedVisible = _React$useState2[0],\n    setAnimatedVisible = _React$useState2[1];\n  // ============================= Warn =============================\n  if (process.env.NODE_ENV !== 'production') {\n    warnCheck(props);\n  }\n  // ============================= Open =============================\n  var internalAfterOpenChange = function internalAfterOpenChange(nextVisible) {\n    setAnimatedVisible(nextVisible);\n    afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(nextVisible);\n  };\n  // ============================ Render ============================\n  if (!forceRender && !animatedVisible && !open && destroyOnClose) {\n    return null;\n  }\n  var drawerPopupProps = _objectSpread(_objectSpread({}, props), {}, {\n    open: open,\n    prefixCls: prefixCls,\n    placement: placement,\n    autoFocus: autoFocus,\n    keyboard: keyboard,\n    width: width,\n    mask: mask,\n    maskClosable: maskClosable,\n    inline: getContainer === false,\n    afterOpenChange: internalAfterOpenChange\n  });\n  return /*#__PURE__*/React.createElement(Portal, {\n    open: open || forceRender || animatedVisible,\n    autoDestroy: false,\n    getContainer: getContainer,\n    autoLock: mask && (open || animatedVisible)\n  }, /*#__PURE__*/React.createElement(DrawerPopup, drawerPopupProps));\n};\nif (process.env.NODE_ENV !== 'production') {\n  Drawer.displayName = 'Drawer';\n}\nexport default Drawer;"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAOC,cAAc,MAAM,0CAA0C;AACrE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,sBAAsB;AACzC,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,SAAS,QAAQ,QAAQ;AAClC,IAAIC,MAAM,GAAG,SAASA,MAAM,CAACC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